﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Setting.master" AutoEventWireup="true" CodeFile="Roles.aspx.cs" Inherits="Setting_Roles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SettingHeader" Runat="Server">
    <style type="text/css">
         #searchBar{ padding:10px 0px 5px 0px;}
         #btnBar{ padding:10px 0px; }
     </style>
     <script type="text/javascript">
         $(function () {
             $('.commonTable tr').hover(function () {
                 $(this).css('background-color', '#ffffae');
             },
            function () {
                $(this).css('background-color', '#FFFFFF');
            });
         });

         function addRole() {
             window.open('add_role.aspx', '', 'width=500px,height=500px,scrollbars=1,resizable=no,left=' + (screen.availWidth - 500) / 2 + ',top=' + (screen.availHeight - 500) / 2);
         }
        function editRole(id) {
            window.open('add_role.aspx?id=' + id, '', 'width=500px,height=500px,scrollbars=1,resizable=no,left=' + (screen.availWidth - 500) / 2 + ',top=' + (screen.availHeight - 500) / 2);
        }
         function delRole(id) {
             if (confirm('确定删除?'))
                 window.location = "roles.aspx?delID=" + id;
        }
        function viewRoleUser(id) {
        	window.location = "RoleUsers.aspx?roleID=" + id;
		}
         function GoPage(n) {
         	window.location = "roles.aspx?key=<%=key %>&p=" + n;
         }
         function doSearch() {
         	window.location = "roles.aspx?key=" + $("#searchText").val();
         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SettingContent" Runat="Server">
<div class="navTitle"><a href="#">系统设置</a> > 角色</div>
<div id="searchBar"><input type="text" id="searchText" name="searchText" value="<%=key %>" /><input type="button" value="查找" onclick="doSearch()" /></div>
<div>
    <table class="commonTable" cellspacing="0" cellpadding="5" >
	    <tr>
		    <th>角色名称</th>
		    <th>描述</th>
		    <th>角色人员</th>
		    <th>
		    </th>
	    </tr>
        <% WriteTableData();%>
	</table>
	<div class="gridPager">
		<%WriteTablePager(); %>
	</div>
    <div id="btnBar"><input type="button" value="添加角色" onclick="addRole()" /></div>
</div>
</asp:Content>

